<template>
	<view class="container" v-if="data && data.id">
		<view class="title">
			{{data.title}}
		</view>
		<view class="time">
			{{data.createTime | formatISODate}}
		</view>
		<view class="body">
			<view class="" v-html="data.content">
				
			</view>
		</view>
	</view>
</template>

<script>
	import {
		messageInfo
	} from '@/common/http.api.js';
	export default {
		data() {
			return {
				id: '',
				data: {
					title: "",
					create_time: "",
					content: ``,
				},
			}
		},
		onLoad(o) {
			this.id = o.id
			this.getData()
		},
		methods: {
			getData() {
				messageInfo(this.id).then(res=>{
					if (res.code == 200) {
						this.data = res.data
					} 
				})
			},
		}
	}
</script>

<style lang="less" scoped>
	.container {
		padding: 40rpx 20rpx;

		.title {
			line-height: 40rpx;
			font-weight: bold;
			font-size: 30rpx;
			color: #11192D;
			text-align: left;

		}

		.time {
			height: 40rpx;
			line-height: 40rpx;
			font-size: 30rpx;
			color: #979797;
			text-align: left;
			margin-top: 20rpx;
		}

		.body {
			margin-top: 20rpx;
			line-height: 40rpx;
			font-size: 28rpx;
			color: #979797;
		}
	}
</style>